import {gift} from "../../../services/api"

export default {
  namespace:'gift',

  state:{
    data:[],
  },

  effects: {
    *gift({ payload }, { call, put }) {
      const response = yield call(gift, payload);
      yield put({
        type: 'savefreedata',
        payload: response,
      });
    },
  },

  reducers:{
    savefreedata(state, action) {
      return {
        ...state,
        data: action.payload,
      };
    },
  }
}
